// ************************************************************************ //
// WARNING
// -------
// The types declared in this file were generated from data read from a
// Type Library. If this type library is explicitly or indirectly (via
// another type library referring to this type library) re-imported, or the
// 'Refresh' command of the Type Library Editor activated while editing the
// Type Library, the contents of this file will be regenerated and all
// manual modifications will be lost.
// ************************************************************************ //

// C++ TLBWRTR : $Revision:   1.134.1.39  $
// File generated on 19.12.2006 15:25:18 from Type Library described below.

// ************************************************************************ //
// Type Lib: D:\Program Files\ASCON\KOMPAS-3D V8 Plus\Bin\kGAX.TLB (1)
// IID\LCID: {B97871C2-BB9B-49E7-8FD3-C1201922EDD8}\0
// Helpfile: D:\Program Files\ASCON\KOMPAS-3D V8 Plus\Bin\KGAX.hlp
// DepndLst:
//   (1) v2.0 stdole, (C:\WINDOWS\System32\stdole2.tlb)
//   (2) v4.0 StdVCL, (C:\WINDOWS\System32\stdvcl40.dll)
//   (3) v1.0 Kompas6API5, (K:\Debug\Exe\kAPI5.TLB)
// ************************************************************************ //
#ifndef   __KGAXLib_OCX_h__
#define   __KGAXLib_OCX_h__

#pragma option push -b -w-inl

#include <utilcls.h>
#if !defined(__UTILCLS_H_VERSION) || (__UTILCLS_H_VERSION < 0x0500)
//
// The code generated by the TLIBIMP utility or the Import|TypeLibrary
// and Import|ActiveX feature of C++Builder rely on specific versions of
// the header file UTILCLS.H found in the INCLUDE\VCL directory. If an
// older version of the file is detected, you probably need an update/patch.
//
#error "This file requires a newer version of the header UTILCLS.H" \
       "You need to apply an update/patch to your copy of C++Builder"
#endif
#include <olectl.h>
#include <ocidl.h>
#if !defined(_NO_VCL)
#include <stdvcl.hpp>
#endif  //   _NO_VCL
#include <ocxproxy.h>
#include "ks_Tlb.h"

#include "KGAXLib_TLB.h"
namespace Kgaxlib_tlb
{

// *********************************************************************//
// HelpString: KGAX ActiveX Control module
// Version:    1.0
// *********************************************************************//


// *********************************************************************//
// COM Component Proxy Class Declaration
// Component Name   : TKGAX
// Help String      : KGAX Control
// Default Interface: _DKGAX
// Def. Intf. Object: _DKGAXDisp
// Def. Intf. DISP? : Yes
// Event   Interface: _DKGAXEvents
// TypeFlags        : (34) CanCreate Control
// *********************************************************************//

// *********************************************************************//
// Definition of closures to allow VCL handlers to catch OCX events.
// *********************************************************************//
typedef void __fastcall (__closure * TKGAXOnKgMouseDown)(System::TObject * Sender,
                                                         short nButton/*[in]*/,
                                                         short nShiftState/*[in]*/, long x/*[in]*/,
                                                         long y/*[in]*/, TOLEBOOL* proceed/*[out]*/);
typedef void __fastcall (__closure * TKGAXOnKgMouseUp)(System::TObject * Sender,
                                                       short nButton/*[in]*/,
                                                       short nShiftState/*[in]*/, long x/*[in]*/,
                                                       long y/*[in]*/, TOLEBOOL* proceed/*[out]*/);
typedef void __fastcall (__closure * TKGAXOnKgMouseDblClick)(System::TObject * Sender,
                                                             short nButton/*[in]*/,
                                                             short nShiftState/*[in]*/,
                                                             long x/*[in]*/, long y/*[in]*/,
                                                             TOLEBOOL* proceed/*[out]*/);
typedef void __fastcall (__closure * TKGAXOnKgCreate)(System::TObject * Sender,
                                                      long docID/*[in]*/);
typedef void __fastcall (__closure * TKGAXOnKgPaint)(System::TObject * Sender,
                                                     Kgaxlib_tlb::PaintObjectPtr paintObj/*[in]*/);
typedef void __fastcall (__closure * TKGAXOnKgCreateGLList)(System::TObject * Sender,
                                                            Kgaxlib_tlb::GLObjectPtr glObj/*[in]*/,
                                                            Kgaxlib_tlb::KDocument3DDrawMode drawMode/*[in]*/);
typedef void __fastcall (__closure * TKGAXOnKgAddGabatit)(System::TObject * Sender,
                                                          Kgaxlib_tlb::GabaritObjectPtr gabObj/*[in]*/);
typedef void __fastcall (__closure * TKGAXOnKgErrorLoadDocument)(System::TObject * Sender,
                                                                 long docID/*[in]*/,
                                                                 BSTR fileName/*[in]*/,
                                                                 long errorID/*[in]*/);
typedef void __fastcall (__closure * TKGAXOnKgKeyDown)(System::TObject * Sender,
                                                       long* key/*[in,out]*/,
                                                       short nShiftState/*[in]*/);
typedef void __fastcall (__closure * TKGAXOnKgKeyUp)(System::TObject * Sender,
                                                     long* key/*[in,out]*/,
                                                     short nShiftState/*[in]*/);
typedef void __fastcall (__closure * TKGAXOnKgKeyPress)(System::TObject * Sender,
                                                        long* key/*[in,out]*/);
//+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
// Proxy class to host KGAX Control in CBuilder IDE/Applications.
//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
class PACKAGE TKGAX : public TOleControl
{
  OVERLOADED_PROP_METHODS;
  static TNoParam  OptParam;
  static GUID      DEF_CTL_INTF;

  // Instance of Closures to expose OCX Events as VCL ones
  //
  TKGAXOnKgMouseDown             FOnKgMouseDown;
  TKGAXOnKgMouseUp               FOnKgMouseUp;
  TKGAXOnKgMouseDblClick         FOnKgMouseDblClick;
  TNotifyEvent                   FOnKgStopCurrentProcess;
  TKGAXOnKgCreate                FOnKgCreate;
  TKGAXOnKgPaint                 FOnKgPaint;
  TKGAXOnKgCreateGLList          FOnKgCreateGLList;
  TKGAXOnKgAddGabatit            FOnKgAddGabatit;
  TKGAXOnKgErrorLoadDocument     FOnKgErrorLoadDocument;
  TKGAXOnKgKeyDown               FOnKgKeyDown;
  TKGAXOnKgKeyUp                 FOnKgKeyUp;
  TKGAXOnKgKeyPress              FOnKgKeyPress;

  // Default Interace of OCX
  //
  _DKGAXDisp m_OCXIntf;

  // VCL Property Getters/Setters which delegate to OCX
  //

  // Static variables used by all instances of OCX proxy
  //
  static int          EventDispIDs[12];
  static TControlData CControlData;
  static GUID         CTL_DEF_INTF;

  // Method providing access to interface as __property
  //
  _DKGAXDisp __fastcall GetDefaultInterface();
  _DKGAXDisp __fastcall GetControlInterface()
  { return GetDefaultInterface(); }

protected:
  void     __fastcall CreateControl  ();
  void     __fastcall InitControlData();

public:
  virtual  __fastcall TKGAX(TComponent* AOwner) : TOleControl(AOwner)
  {};
  virtual  __fastcall TKGAX(HWND        Parent) : TOleControl(Parent)
  {};

  // OCX methods
  //
  Ks_tlb::KompasObjectPtr __fastcall GetKompasObject(void);
  Kgaxlib_tlb::KDocumentType __fastcall GetDocumentType(OleVariant index/*[in]*/);
  LPDISPATCH      __fastcall GetDocumentInterface(OleVariant index/*[in]*/, long newAPI);
  long            __fastcall GetActiveDocumentID(void);
  long            __fastcall GetDocumentsCount(void);
  long            __fastcall AddDocument(BSTR fileName/*[in]*/);
  long            __fastcall AddNewDocument(Kgaxlib_tlb::KDocumentType type/*[in]*/);
  long            __fastcall InsertDocument(BSTR fileName/*[in]*/, OleVariant index/*[in]*/);
  long            __fastcall InsertNewDocument(Kgaxlib_tlb::KDocumentType type/*[in]*/,
                                               OleVariant index/*[in]*/);
  TOLEBOOL        __fastcall RemoveDocument(OleVariant index/*[in]*/);
  TOLEBOOL        __fastcall ActivateDocument(OleVariant index/*[in]*/);
  long            __fastcall CloseAll(void);
  int             __fastcall TestLoadDocument(BSTR fileName/*[in]*/);
  TOLEBOOL        __fastcall InvalidateActiveDocument(TOLEBOOL erase/*[in]*/);
  void            __fastcall ZoomEntireDocument(void);
  void            __fastcall MoveViewDocument(void);
  void            __fastcall PanoramaViewDocument(void);
  void            __fastcall RotateViewDocument(void);
  void            __fastcall OrientationDocument(void);
  void            __fastcall ZoomWindow(Kgaxlib_tlb::KZoomType type/*[in,def,opt]*/);
  void            __fastcall StopCurrentProcess(TOLEBOOL cancel/*[in,def,opt]*/);
  TOLEBOOL        __fastcall DrawToDC(OLE_HANDLE dc/*[in]*/, long left/*[in]*/, long top/*[in]*/,
                                      long width/*[in]*/, long height/*[in]*/);
  void            __fastcall SetCurrentLibManager(long t/*[in]*/);
  void            __fastcall SetGabaritModifying(void);
  long            __fastcall GetDocumentID(OleVariant index/*[in]*/);

  // OCX properties
  //
  __property _DKGAXDisp ControlInterface={ read=GetDefaultInterface };

  // Published properties
  //
__published:

  // Standard/Extended properties
  //
  __property TabStop;
  __property Align;
  __property DragCursor;
  __property DragMode;
  __property ParentShowHint;
  __property PopupMenu;
  __property ShowHint;
  __property TabOrder;
  __property Visible;
  __property OnDragDrop;
  __property OnDragOver;
  __property OnEndDrag;
  __property OnEnter;
  __property OnExit;
  __property OnStartDrag;

  // OCX properties
  //
  __property System::WideString Caption={ read=GetWideStringProp, write=SetWideStringProp, stored=false, index=-518 };
  __property System::WideString Text={ read=GetWideStringProp, write=SetWideStringProp, stored=false, index=-517 };
  __property Activex::TOleEnum DocumentType={ read=GetTOleEnumProp, write=SetTOleEnumProp, stored=false, index=1 };
  __property System::WideString DocumenFileName={ read=GetWideStringProp, write=SetWideStringProp, stored=false, index=2 };
  __property Activex::TOleEnum Document3DDrawMode={ read=GetTOleEnumProp, write=SetTOleEnumProp, stored=false, index=3 };
  __property bool Document3DWireframeShadedMode={ read=GetWordBoolProp, write=SetWordBoolProp, stored=false, index=4 };

  // OCX Events
  //
  __property TKGAXOnKgMouseDown OnKgMouseDown={ read=FOnKgMouseDown, write=FOnKgMouseDown };
  __property TKGAXOnKgMouseUp OnKgMouseUp={ read=FOnKgMouseUp, write=FOnKgMouseUp };
  __property TKGAXOnKgMouseDblClick OnKgMouseDblClick={ read=FOnKgMouseDblClick, write=FOnKgMouseDblClick };
  __property TNotifyEvent OnKgStopCurrentProcess={ read=FOnKgStopCurrentProcess, write=FOnKgStopCurrentProcess };
  __property TKGAXOnKgCreate OnKgCreate={ read=FOnKgCreate, write=FOnKgCreate };
  __property TKGAXOnKgPaint OnKgPaint={ read=FOnKgPaint, write=FOnKgPaint };
  __property TKGAXOnKgCreateGLList OnKgCreateGLList={ read=FOnKgCreateGLList, write=FOnKgCreateGLList };
  __property TKGAXOnKgAddGabatit OnKgAddGabatit={ read=FOnKgAddGabatit, write=FOnKgAddGabatit };
  __property TKGAXOnKgErrorLoadDocument OnKgErrorLoadDocument={ read=FOnKgErrorLoadDocument, write=FOnKgErrorLoadDocument };
  __property TKGAXOnKgKeyDown OnKgKeyDown={ read=FOnKgKeyDown, write=FOnKgKeyDown };
  __property TKGAXOnKgKeyUp OnKgKeyUp={ read=FOnKgKeyUp, write=FOnKgKeyUp };
  __property TKGAXOnKgKeyPress OnKgKeyPress={ read=FOnKgKeyPress, write=FOnKgKeyPress };
};
typedef TKGAX  TKGAXProxy;

};     // namespace Kgaxlib_tlb

#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using  namespace Kgaxlib_tlb;
#endif

#pragma option pop

#endif // __KGAXLib_OCX_h__
